package model.requirement4;

// 芝士装饰器
public class CheeseDecorator extends PizzaDecorator {
    public CheeseDecorator(CustomPizza pizza) {
        super(pizza);
    }

    @Override
    public String getDescription() {
        return pizza.getDescription() + ", 额外芝士";
    }

    @Override
    public double getCost() {
        return pizza.getCost() + 1.50; // 芝士的额外价格
    }
}
